﻿using Coldairarrow.Entity;
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.IT;
using Coldairarrow.Entity.PB;
using Coldairarrow.Entity.Print;
using Coldairarrow.Util;
using Coldairarrow.Util.ClassLibrary;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_JobBookingBusiness
    {
        Task<PageResult<PB_JobBooking>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PB_JobBooking> GetTheDataAsync(string id);
        Task AddDataAsync(PB_JobBooking data);
        Task UpdateDataAsync(PB_JobBooking data);
        Task DeleteDataAsync(List<string> ids);
        /// <summary>
        /// PDA报工保存接口
        /// </summary>
        /// <param name="data">数据</param>
        /// <param name="_mongodbOptions">数据</param>
        /// <returns></returns>
        Task AddData(List<PB_JobBookingDTOquery> data, MongoDBOptions _mongodbOptions);

        /// <summary>
        /// PDA质检获取报工信息
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<List<PB_JobBookingDTO>> GetTheDataDeatil(string OrderDetailQrCode);

        /// <summary>
        /// PDA质检获取报工信息(输入)
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<List<PB_JobBookingDTO>> GetTheDataDeatilInput(string OrderDetailQrCode);

        /// <summary>
        /// 解析二维码通用接口
        /// </summary>
        /// <param name="QrCode">二维码信息</param>
        /// <returns></returns>
        Task<Object> GetAnalyticCode(string QrCode);

        /// <summary>
        /// 解析二维码通用接口(输入)
        /// </summary>
        /// <param name="QrCode">二维码信息</param>
        /// <returns></returns>
        Task<Object> GetAnalyticInputCode(string QrCode);

        /// <summary>
        /// 获取全局变量
        /// </summary>
        /// <param name="LinkType">全局变量码</param>
        /// <returns></returns>
        Task<Object> GetLinkTypeDataAsync(string LinkType);

        /// <summary>
        /// 微信扫一扫识别物料二维码
        /// </summary>
        /// <param name="QrCode"></param>
        /// <returns></returns>
        Task<ScanInfoByWX> GetMaterialInfoByScanAsync(string QrCode);

        /// <summary>
        /// 质检
        /// </summary>
        /// <param name="data">质检信息</param>
        /// <param name="userqrcode">用户二维码信息</param>
        /// <param name="_mongodbOptions"></param>
        /// <returns></returns>
        Task UpdataListData(List<PB_JobBookingListDTO> data, string userqrcode, MongoDBOptions _mongodbOptions);

        /// <summary>
        /// 获取报工List
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_JobBookingDTO>> GetWorkReportDataListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 获取质检List
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_JobBookingDTO>> GetQualityDataListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 业务初始化打印,数据插入队列
        /// </summary>
        /// <param name="servicecode">业务码</param>
        /// <param name="_mongodbOptions">mongo</param>
        /// <returns></returns>
        Task<Object> GetQueueListAsync(string servicecode, MongoDBOptions _mongodbOptions);

        /// <summary>
        /// 业务初始化打印,数据插入队列
        /// </summary>
        /// <param name="servicecode">业务码</param>
        /// <param name="_mongodbOptions">mongo</param>
        /// <returns></returns>
        Task<Object> InsertMongodb(InsertMongodbDTO servicecode, MongoDBOptions _mongodbOptions);
        /// <summary>
        /// 获取报工明细接口
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_JobBookingDetailedListDTO>> GetJobBookingDetailedListAsync(PageInput<PBJobBookingConditionDTO> input);

        /// <summary>
        /// PDA统计获取质检信息
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<List<PB_JobBookingDTO>> GetQualityTestingListAsync(string OrderDetailQrCode);

        /// <summary>
        /// PDA统计获取质检信息（输入）
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<List<PB_JobBookingDTO>> GetQualityTestingListInputAsync(string OrderDetailQrCode);

        /// <summary>
        /// 统计
        /// </summary>
        /// <param name="data">质检信息</param>
        /// <param name="_mongodbOptions">Mongo</param>
        /// <param name="_redisOptions">redis获取流水号</param>
        /// 调整统计默认打印机   2022-03-01   赵锦涛
        /// <returns></returns>
        Task UpdataStatisticsListData(List<PB_JobBookingListDTO> data, MongoDBOptions _mongodbOptions, RedisOptions _redisOptions);

        /// <summary>
        /// 获取当前报工人是否有报工数据
        /// </summary>
        /// <param name="querydata"></param>
        /// <returns></returns>
        Task<PB_JobBooking> GetTheUserListData(PB_JobBookingQueryDTO querydata);

        /// <summary>
        /// 删除当前报工已存在且没有质检的数据
        /// </summary>
        /// <param name="querydata"></param>
        /// <returns></returns>
        Task<PB_ProductionOrderDetailData> DelTheUserData(PB_JobBookingQueryDTO querydata);
        /// <summary>
        /// 获取登录人的打印机列表
        /// </summary>
        /// <param name="PrintType">打印机类型</param>
        /// <returns></returns>
        Task<List<Printers>> GetPrinterListDataAsync(string PrintType);

        /// <summary>
        /// PDA统计物料打印
        /// </summary>
        /// <param name="data"></param>
        /// <param name="_mongodbOptions">Mongo</param>
        /// <param name="_redisOptions">redis获取流水号</param>
        /// <returns></returns>
        Task ProductPrintAsync(ProductPrintData data, MongoDBOptions _mongodbOptions, RedisOptions _redisOptions);

        /// <summary>
        /// PDA报工物料打印
        /// </summary>
        /// <param name="data"></param>
        /// <param name="_mongodbOptions">Mongo</param>
        /// <param name="_redisOptions">redis获取流水号</param>
        /// <returns></returns>
        Task WorkProductPrintAsync(List<ProductPrintData> data, MongoDBOptions _mongodbOptions, RedisOptions _redisOptions);

        /// <summary>
        /// PDA报工明细删除
        /// </summary>
        /// <param name="OrderDetailId">任务单明细Id</param>
        /// <returns></returns>
        Task DelOrderDetailAsync(string OrderDetailId);

        #region   PC报工(喷涂报工)

        /// <summary>
        /// 通用接口(PC报工)
        /// </summary>
        /// <param name="QrCode">二维码</param>
        /// <returns></returns>
        Task<Object> GetUserInfoAsync(string QrCode);

        /// <summary>
        /// 成品报工(最后一道工序)
        /// </summary>
        /// <param name="data"></param>
        /// <param name="_mongodbOptions"></param>
        /// <param name="_redisOptions"></param>
        /// <returns></returns>
        Task WorkReportPrintListAsync(WorkReportPrintData data, MongoDBOptions _mongodbOptions, RedisOptions _redisOptions);

        /// <summary>
        /// 成品报工信息(最后一道工序)
        /// </summary>
        /// <param name="UserQrcode">报工人二维码</param>
        /// <returns></returns>
        Task<List<CirculationBillList>> GetCirculationBillListAsync(string UserQrcode);

        /// <summary>
        /// 大屏显示当日合格数(件)
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>当日合格数(件)</returns>
        ScreenDisplayValue3DTO GetTodayStatisticsNums(int Day);
        /// <summary>
        /// 大屏显示当日不良品数(件)
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>当日不良品数(件)</returns>
        ScreenDisplayValue3DTO GetTodayNoPassNums(int Day);
        /// <summary>
        /// 大屏显示当日良品率
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>当日良品率</returns>
        ScreenDisplayDashboardDTO GetTodayPassRate(int Day);
        /// <summary>
        /// 大屏显示指定车间当日质量合格率
        /// </summary>
        /// <param name="WorkShopName">车车间名称,比如"A1车间","A4车间"</param>
        /// <param name="Day">前第几天</param>
        /// <returns>当日良品率</returns>
        ScreenDisplayProgressDTO GetTodayPassRateByWorkShop(string WorkShopName, int Day);
        /// <summary>
        /// 大屏显示指定车间当月质量合格率
        /// </summary>
        /// <param name="WorkShopName">车车间名称,比如"A1车间","A4车间"</param>
        /// <param name="Month">前第几月</param>
        /// <returns>当月质量合格率</returns>
        ScreenDisplayProgressDTO GetMonthPassRate(string WorkShopName, int Month);
        ///// <summary>
        ///// 大屏显示指定车间当月产量(吨)
        ///// </summary>
        ///// <param name="WorkShopName">车间名称,比如"A1车间","A4车间"</param>
        ///// <param name="Month">前第几月</param>
        ///// <returns>当月合格数(件)</returns>
        //ScreenDisplayValueDTO GetMonthStatisticsNums(string WorkShopName, int Month);
        /// <summary>
        /// 大屏显示七日产量(吨)
        /// </summary>
        /// <param name="Day">前第几天</param>
        /// <returns>七日产量(吨)</returns>
        PB_JobBooking7DayStatisticsNumsDTO GetSevenDaysStatisticsNums(int Day);
        #endregion

        #region  工序流转报工

        /// <summary>
        /// 工序报工
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<WorkProject> WorkingProcedureWorkReportAsync(WorkingProcedureData data);

        /// <summary>
        /// 获取工序报工的物料信息
        /// </summary>
        /// <param name="DispatchDetailQrCode">派工单明细二维码</param>
        /// <returns></returns>
        Task<PB_DispatchDetailProjectDTO> GetDispatchDetailProjectDataAsync(string DispatchDetailQrCode);

        /// <summary>
        /// 统计获取流转单的信息
        /// </summary>
        /// <param name="CirQrCode">流转单二维码</param>
        /// <returns></returns>
        Task<PB_CirculationBillDTO> GetCirculationBillDataAsync(string CirQrCode);

        /// <summary>
        /// 接收获取流转单的信息
        /// </summary>
        /// <param name="CirQrCode">流转单二维码</param>
        /// <returns></returns>
        Task<PB_CirculationBillDTO> GetReceiveCirculationBillDataAsync(string CirQrCode);

        /// <summary>
        /// 接收流转单
        /// </summary>
        /// <param name="CirBillQrCode">流转单二维码</param>
        /// <param name="Nums">接收数量</param>
        /// <returns></returns>
        Task ReceiveCirculationBillAsync(string CirBillQrCode, Double? Nums);

        /// <summary>
        /// 流转单质检
        /// </summary>
        /// <param name="CirBillQrCode">流转单二维码</param>
        /// <param name="Nums">统计数量</param>
        /// <returns></returns>
        Task QualityCirculationBillAsync(string CirBillQrCode, Double? Nums);

        /// <summary>
        /// 流转单统计
        /// </summary>
        /// <param name="CirBillQrCode">流转单二维码</param>
        /// <param name="Nums">统计数量</param>
        /// <returns></returns>
        Task StatisticsCirculationBillAsync(string CirBillQrCode, Double? Nums);

        /// <summary>
        /// 工序流转单补打
        /// </summary>
        /// <param name="DispatchDetailQrCode">派工单明细二维码</param>
        /// <returns></returns>
        Task<List<WorkProject>> GetCirculationBillPrintAsync(string DispatchDetailQrCode);

        #endregion

        #region 翻新领料生成翻新出库流转卡

        /// <summary>
        /// 获取翻新出库的生产任务明细信息(作废)
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<OrderDetailMaterialData> GetOrderDetailCirBillDataAsync(string OrderDetailQrCode);

        /// <summary>
        /// 翻新生产任务单生成翻新出库流转卡(作废)
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<WorkProject> AddCirculationBillDataAsync(OrderDetailData data);

        /// <summary>
        /// 翻新领料(作废)
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<WorkProject> RefurbishmentPickingAsync(RefurbishmentData data);

        /// <summary>
        /// 翻新领料获取包信息
        /// </summary>
        /// <param name="PackQrCode">包二维码</param>
        /// <param name="OrderQrCode">任务单二维码</param>
        /// <returns></returns>
        Task<CirPackListData> GetCirPackListDataAsync(string PackQrCode, string OrderQrCode);

        /// <summary>
        /// 翻新流转单补打
        /// </summary>
        ///  <param name="DispatchDetailQrCode">派工单明细二维码</param>
        /// <returns></returns>
        Task<List<WorkProject>> GetOrderDetailCirBillPrintAsync(string DispatchDetailQrCode);

        /// <summary>
        /// 扫描生产任务单明细二维码获取物料信息
        /// </summary>
        /// <param name="orderdetailQrcode">生产任务单明细二维码</param>
        /// <param name="LocaQrcode">货位二维码</param>
        /// <returns></returns>
        Task<OrderDetailMaterialDTO> GetOrderDetailMaterialAsync(string orderdetailQrcode, string LocaQrcode);

        /// <summary>
        /// 翻新领料(根据生产任务单明细输入数量)
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<WorkProject> RefurMaterialPickingAsync(RefurMaterialData data);

        #endregion

        #region  打印服务

        /// <summary>
        /// 校验组织编码,并返回组织信息和打印机信息
        /// </summary>
        /// <param name="DeptCode">组织编码</param>
        /// <returns></returns>
        Task<DepartmentPrintDTO> GetDepartmentDataAsync(string DeptCode);


        #endregion

        /// <summary>
        /// 报工统计
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<WorkReportingDto>> ViewWorkReportingDto(string month);
        /// <summary>
        /// PDA快速质检
        /// </summary>
        /// <param name="Data"></param>
        /// <param name="_mongodbOptions"></param>
        /// <returns></returns>
        Task UpdataRapidInspection(QuickWorkReportData Data);
        /// <summary>
        /// pc报工统计页面获取人员list
        /// </summary>
        /// <returns></returns>
        Task<List<ReportStatistics>> GetReportStatistics(string month);
        /// <summary>
        /// 通过人员获取报工明细物料数据
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="month"></param>
        /// <returns></returns>
        Task<List<StatisticalDetails>> GetWorkReportingList(string UserId,string month);
        Task<MonthSummary> GetMonthSummary(string month);

        #region 维修改制

        /// <summary>
        /// 领料根据货位获取仓库物料信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<WXGZLocaMaterialDTO>> GetWXGZLocaMaterialListAsync(PageInput<WXGZConditionDTO> input);

        /// <summary>
        /// 维修改制领料保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveWXGZLocalMaterialDataAsync(WXGZmaterialData data);

        /// <summary>
        /// 获取维修改制领料记录
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<List<ReformMaterialReceiveDTO>> GetReformMaterialReceiveListAsync(string OrderDetailQrCode);

        /// <summary>
        /// 维修改制领料提交(生产出库单)
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task SubmitReformMaterialReceiveAsync(string OrderDetailQrCode);

        /// <summary>
        /// 维修改制领料移除
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task DeleteReformMaterialReceiveAsync(ReformMaterialReceiveDTO data);

        /// <summary>
        /// 扫描任务单明细二维码获取任务单明细信息
        /// </summary>
        /// <param name="OrderDetailQrCode">任务单明细二维码</param>
        /// <returns></returns>
        Task<PB_ProductionOrderDetail> GetProductionOrderDetailDataAsync(string OrderDetailQrCode);


        #endregion

    }

    #region

    public class RefurMaterialData
    {

        /// <summary>
        /// 货位二维码
        /// </summary>
        public string LocaQrcode { get; set; }

        /// <summary>
        /// 托盘二维码
        /// </summary>
        public string TrayQrcode { get; set; }

        /// <summary>
        /// 生产任务单明细二维码
        /// </summary>
        public string orderdetailQrcode { get; set; }

        /// <summary>
        /// 派工单明细二维码
        /// </summary>
        public string DispatchDetailQrCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Nums { get; set; }

    }

    public class ProductPrintData
    {

        /// <summary>
        /// 任务单明细Id
        /// </summary>
        public string OrderDetailId { get; set; }

        /// <summary>
        /// 任务单明细Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Num { get; set; }

        /// <summary>
        /// 打印机Id
        /// </summary>
        public string PrinterId { get; set; }

        /// <summary>
        /// 车间id
        /// </summary>
        public string WorkshopId { get; set; }

        /// <summary>
        /// 报工Id
        /// </summary>
        public string JobId { get; set; }

    }

    /// <summary>
    /// 成品报工(最后一道工序)传值
    /// </summary>
    public class WorkReportPrintData
    {
        /// <summary>
        /// 流转单二维码
        /// </summary>
        public string QrCode { get; set; }

        /// <summary>
        /// 设备二维码
        /// </summary>
        public string DeviceQrCode { get; set; }
    }

    /// <summary>
    /// 成品报工信息(最后一道工序)
    /// </summary>
    public class CirculationBillList
    {
        /// <summary>
        /// 排序
        /// </summary>
        public string RowNum { get; set; }

        /// <summary>
        /// 报工时间
        /// </summary>
        public string SendTime { get; set; }

        /// <summary>
        /// 报工人Id
        /// </summary>
        public string WorkerId { get; set; }

        /// <summary>
        /// 报工人姓名
        /// </summary>
        public string WorkerName { get; set; }

        /// <summary>
        /// 报工物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 报工物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 报工物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 报工物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 报工物料数量
        /// </summary>
        public Double? Nums { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        public string DeviceId { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }

    }

    /// <summary>
    /// 工序报工传值
    /// </summary>
    public class WorkingProcedureData
    {
        /// <summary>
        /// 报工人二维码
        /// </summary>
        public string UserQrCode { get; set; }

        /// <summary>
        /// 设备二维码
        /// </summary>
        public string DeviceQrCode { get; set; }

        /// <summary>
        /// 托盘二维码
        /// </summary>
        public string TrayQrCode { get; set; }

        /// <summary>
        /// 派工单明细
        /// </summary>
        public List<DispatchDetailData> DispatchDetailData { get; set; }

    }

    /// <summary>
    /// 工序报工明细
    /// </summary>
    public class DispatchDetailData
    {
        /// <summary>
        /// 派工单明细Id
        /// </summary>
        public string DispatchDetailId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Nums { get; set; }
    }

    /// <summary>
    /// 工序报工物料对应的项目信息
    /// </summary>
    public class WorkProject
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 流转卡二维码
        /// </summary>
        public string QrCode { get; set; }

        /// <summary>
        /// 流转单来源
        /// </summary>
        public string SourceTitle { get; set; }

        /// <summary>
        /// 派工单号
        /// </summary>
        public string DispatchId { get; set; }

        /// <summary>
        /// 任务单名称
        /// </summary>
        public string OrderName { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 工序
        /// </summary>
        public string SubName { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        public string Date { get; set; }

        /// <summary>
        /// 班次
        /// </summary>
        public string TeamTypeName { get; set; }

        /// <summary>
        /// 工件名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 隶属成品
        /// </summary>
        public string SubordinateProductName { get; set; }

        /// <summary>
        /// 工件规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 完工数量
        /// </summary>
        public Double? TaskQuantity { get; set; }

        /// <summary>
        /// 单重
        /// </summary>
        public Double? SingleWeight { get; set; }

        /// <summary>
        /// 总重
        /// </summary>
        public Double? TotalWeight { get; set; }

        /// <summary>
        /// 项目报工信息
        /// </summary>
        public List<ProjectNumsData> ProjectData { get; set; }

    }

    /// <summary>
    /// 项目报工信息
    /// </summary>
    public class ProjectNumsData
    {
        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Nums { get; set; }
    }

    /// <summary>
    /// 生产任务单明细生成翻新出库流转卡
    /// </summary>
    public class OrderDetailMaterialData
    {
        /// <summary>
        /// 生成任务单Id
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 生成任务单明细Id
        /// </summary>
        public string OrderDetailId { get; set; }

        /// <summary>
        /// 生成任务单明细二维码
        /// </summary>
        public string QrCode { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 单重
        /// </summary>
        public Double? SingleWeight { get; set; }

        /// <summary>
        /// 总重
        /// </summary>
        public Double? TotalWeight { get; set; }

        /// <summary>
        /// 生成任务单明细数量
        /// </summary>
        public Double? Productionquantity { get; set; }

        /// <summary>
        /// 报工剩余数量
        /// </summary>
        public Double? JobSurplusNums { get; set; }

        /// <summary>
        /// 任务单名称
        /// </summary>
        public string OrderName { get; set; }
    }

    /// <summary>
    /// 翻新生产任务单生成翻新出库流转卡传值实体
    /// </summary>
    public class OrderDetailData
    {
        /// <summary>
        /// 托盘二维码
        /// </summary>
        public string TrayQrCode { get; set; }

        /// <summary>
        /// 货位二维码
        /// </summary>
        public string LocaQrCode { get; set; }

        /// <summary>
        /// 生产任务单明细二维码
        /// </summary>
        public string OrderDetailQrCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Nums { get; set; }

    }

    /// <summary>
    /// 获取生产任务单的项目信息
    /// </summary>
    public class OrderProjectData
    {
        /// <summary>
        /// 生成任务单Id
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

    }

    /// <summary>
    /// 翻新领料传值DATA
    /// </summary>
    public class RefurbishmentData
    {
        /// <summary>
        /// 任务单(1、生产任务单；2、外协任务单)
        /// </summary>
        public string OrderQrCode { get; set; }

        /// <summary>
        /// 包码集合
        /// </summary>
        public List<string> PackQrCode { get; set; }
    }

    /// <summary>
    /// 翻新领料包对象
    /// </summary>
    public class CirPackListData : IT_LocalDetail
    {
        /// <summary>
        /// 包名称
        /// </summary>
        public string BoxName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string LocalName { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 托盘名称
        /// </summary>
        public string TrayName { get; set; }

        /// <summary>
        /// 单重
        /// </summary>
        public Double? SingleWeight { get; set; }

        /// <summary>
        /// 总重
        /// </summary>
        public Double? TotalWeight { get; set; }

        /// <summary>
        /// 包二维码
        /// </summary>
        public string PackQrCode { get; set; }

    }

    public class OrderDeatilMaterialData
    {
        /// <summary>
        /// 任务单Id
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 任务单物料数量
        /// </summary>
        public Double? Productionquantity { get; set; }

        /// <summary>
        /// 已扫描数量
        /// </summary>
        public Double? WorkReportQuantity { get; set; }

        /// <summary>
        /// 是否外协：0-否;1-是
        /// </summary>
        public Boolean? IsOutsourcing { get; set; }

    }

    public class DeviceSubDTO : PB_Dispatch
    {

        /// <summary>
        /// 工序Id
        /// </summary>
        public string SubId { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        public string DeviceId { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }


    }

    public class OrderDetailMaterialDTO
    {
        /// <summary>
        /// 任务单明细Id
        /// </summary>
        public string OrderDetailId { get; set; }

        /// <summary>
        /// 任务单Id
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 生产数量
        /// </summary>
        public double? Productionquantity { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料编号
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 已领料数量
        /// </summary>
        public double? WorkReportQuantity { get; set; }

        /// <summary>
        /// 剩余领料数量
        /// </summary>
        public double? SurplusNums { get; set; }

        /// <summary>
        /// 二维码
        /// </summary>
        public string QrCode { get; set; }

    }


    public class DispatchDetailDataDTO
    {
        /// <summary>
        /// 派工Id
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 派工单明细Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 员工Id
        /// </summary>
        public string StaffId { get; set; }

        /// <summary>
        /// 班别名称
        /// </summary>
        public string TeamTypeName { get; set; }

        /// <summary>
        /// 工序ID
        /// </summary>
        public string SubId { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string SubName { get; set; }

        /// <summary>
        /// 隶属成品
        /// </summary>
        public string SubordinateProductName { get; set; }

    }

    /// <summary>
    /// 工序报工判断是否有领料动作
    /// </summary>
    public class PickingDTO
    {
        /// <summary>
        /// 派工单Id
        /// </summary>
        public string DispatchId { get; set; }

        /// <summary>
        /// 派工单明细Id
        /// </summary>
        public string DispatchDetailId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 领取数量
        /// </summary>
        public Double? Nums { get; set; }
    }

    /// <summary>
    /// 上件报工获取流转卡与派工信息
    /// </summary>
    public class CirBillJobMaterial : PB_CirculationBill
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 是否为成品
        /// </summary>
        public Boolean? IsProduct { get; set; }

        /// <summary>
        /// 是否标准件
        /// </summary>
        public Boolean? IsStandard { get; set; }

        /// <summary>
        /// 是否序列号管理
        /// </summary>
        public Boolean? IsNumber { get; set; }

        /// <summary>
        /// 每包装包含数量
        /// </summary>
        public Double? PackageNum { get; set; }

        /// <summary>
        /// 是否是单个物料
        /// </summary>
        public Boolean? IsSingle { get; set; }

        /// <summary>
        /// 设计清单Id
        /// </summary>
        public string DesignId { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; }

        /// <summary>
        /// 派工数量
        /// </summary>
        public double? DispatchNums { get; set; }

        /// <summary>
        /// 派工单明细Id
        /// </summary>
        public string DetailId { get; set; }

        /// <summary>
        /// 派工时间
        /// </summary>
        public DateTime? DispatchTime { get; set; }

        /// <summary>
        /// 报工Id
        /// </summary>
        public string JobBookId { get; set; }

    }

    /// <summary>
    /// 获取本次上件报工的项目和楼号
    /// </summary>
    public class MaterialProjectDTO
    {
        /// <summary>
        /// 设计清单Id
        /// </summary>
        public string DesignId { get; set; }

        /// <summary>
        /// 项目Id
        /// </summary>
        public string ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 楼号Id
        /// </summary>
        public string BuildingNumberID { get; set; }

        /// <summary>
        /// 楼号
        /// </summary>
        public string BuildingNumberName { get; set; }


    }

    /// <summary>
    /// 计算流转单上件报工数量
    /// </summary>
    public class PB_DispatchGroupDTO : PB_DispatchGroup
    {
        /// <summary>
        /// 报工数量
        /// </summary>
        public Double? JobNums { get; set; }
    }
    #endregion

    #region 维修改制

    /// <summary>
    /// 领料根据货位获取仓库物料信息
    /// </summary>
    public class WXGZLocaMaterialDTO
    {

        public string Id { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public double? ScanNum { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string StorAreaName { get; set; }

    }

    public class WXGZConditionDTO
    {
        public string Condition { get; set; }
        public string Keyword { get; set; }

        /// <summary>
        /// 货位二维码
        /// </summary>
        public string LocalQrCode { get; set; }
    }

    /// <summary>
    /// 领料保存传值
    /// </summary>
    public class WXGZmaterialData
    {
        /// <summary>
        /// 任务单明细二维码
        /// </summary>
        public string OrderDetailQrCode { get; set; }

        public WXGZLocalMaterialDataDTO WXGZLocalMaterial { get; set; }
    }

    /// <summary>
    /// 领料保存DATA
    /// </summary>
    public class WXGZLocalMaterialDataDTO
    {

        public string Id { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public double? ScanNum { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string StorAreaName { get; set; }

        /// <summary>
        /// 领取数量
        /// </summary>
        public double? Nums { get; set; }
    }

    /// <summary>
    /// 获取维修改制领料信息
    /// </summary>
    public class ReformMaterialReceiveDTO : PB_ReformMaterialReceive
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string StorAreaName { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public double? Price { get; set; }
    }

    #endregion

}